﻿using Future.Model.DtoModel;
using Future.Model.SysModel;
using Future.Model.ViewModel;

namespace Future.IBLL
{
    /// <summary>
    /// 描述：菜单业务接口类
    /// 创建人： yangkai
    /// 创建时间：2022/11/15 22:04:34
    /// </summary>
    public interface IMenuBLL
    {
        /// <summary>
        /// 创建菜单
        /// </summary>
        /// <param name="menuModel"></param>
        /// <returns></returns>
        bool CreateMenu(MenuModel menuModel);

        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteMenu(Guid id);

        /// <summary>
        /// 获取所有菜单
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="isAdmin"></param>
        /// <returns></returns>
        List<VueRouterVo> GetAllMenus(Guid userId, bool isAdmin);

        /// <summary>
        /// 根据角色id获取该角色下全部菜单
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<MenuModel> GetListByRoleId(Guid roleId);

        /// <summary>
        /// 根据Id获取菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        MenuModel GetMenuById(Guid id);

        /// <summary>
        /// 条件搜索获取菜单列表
        /// </summary>
        /// <param name="menuQueryDto"></param>
        /// <returns></returns>
        List<MenuModel> GetMenuList(MenuQueryDto menuQueryDto);

        /// <summary>
        /// 通过用户Id获取菜单权限
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<MenuModel> GetMenusByUserId(Guid userId);

        /// <summary>
        /// 更新菜单
        /// </summary>
        /// <param name="menuModel"></param>
        /// <returns></returns>
        bool Update(MenuModel menuModel);
    }
}
